<div class="content-top">
    <div class="top clearfix">
        <h1>{$book_section.title}</h1>

        <div class="copy-link">
            <a data-role="copy_book_link" book-link="{:U('Book/Index/read',array('id'=>$book_id,'section_id'=>$section_id),true,true)}"><i class="icon icon-copy"></i>{:L("_COPY_THIS_PAGE_LINK_")}</a>
        </div>
        <if condition="$book_section['type']&&check_auth('Book/index/editSection')">
            <a class="pull-right" href="{:U('Book/Index/editSection',array('section_id'=>$section_id))}" style="margin-top: 15px;"><i class="icon-edit"></i>{:L("_EDIT_")}</a>
        </if>

        <span class="pull-right" style="margin-right: 10px;margin-top: 15px;">
            {:W('Weibo/Share/shareBtn',array('param'=>array('title'=>$share_title,'content'=>$book_section['summary'],'from'=>$MODULE_ALIAS,'site_link'=>U('Book/Index/read',array('id'=>$book_id,'section_id'=>$section_id))),'text'=>L('_STATION_SHARE_WITH_SINGLE_')))}</span>
    </div>
    <div class="line"></div>
</div>
<div class="content-content">
    <div style="width: 100%;text-align: right"><i class="icon-eye-open"></i> {$book_section.see}</div>
    <notempty name="book_section.keywords">
        <div class="keywords">
          {:L("_KEY_WORD_WITH_SPACE_")}{$book_section.keywords}
        </div>
    </notempty>
    <notempty name="book_section.summary">
        <div class="summary">
            <blockquote>
                <p>{:L("_INTRODUCTION_WITH_COLON_")}{$book_section.summary}</p>
            </blockquote>
        </div>
    </notempty>
    <notempty name="book_section.content">
        <div class="content" style="margin-top: 15px;">
            {$book_section.content}
        </div>
    </notempty>

</div>


<hr>
<div class="localcmt">

    <div style="padding: 5px 20px 50px 20px;">
        {:hook('localComment', array('path'=>"Book/read/$section_id", 'uid'=>$content['uid'],'this_url'=>'book/index/read'))}
    </div>
</div>




<style>
    .zclip{
        top:24px!important;
    }
</style>
<script>
    $(function(){
        $('[data-role="copy_book_link"]').zclip({
            copy: function () {
                return $(this).attr('book-link');
            },
            afterCopy: function () {
                toast.success("{:L('_COPY_SUCCESS_WITH_SINGLE_')}");
            }
        });
    });
    $(function () {
        var interval=setInterval(function(){
            uParse('#book-content');
            clearInterval(interval);
        },100)

    })
    $(document).ready(function () {
        $('.popup-gallery').each(function () { // the containers for all your galleries
            $(this).magnificPopup({
                delegate: '.popup',
                type: 'image',
                tLoading: 'Loading image #%curr%...',
                mainClass: 'mfp-img-mobile',
                gallery: {
                    enabled: true,
                    navigateByImgClick: true,
                    preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
                },
                image: {
                    tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
                    titleSrc: function (item) {
                        /*           return item.el.attr('title') + '<small>by Marsel Van Oosten</small>';*/
                        return '';
                    }
                }
            });
        });

        $('.col-xs-8>.col-xs-4').insertAfter('.col-xs-8');
    });
</script>
